package com.league.zjxn.jetpack.vmodel

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.league.zjxn.base.BaseViewModel
import com.league.zjxn.entity.*
import com.league.zjxn.jetpack.repository.HomeRepository
import com.league.zjxn.jetpack.repository.LeagueRepository
import com.league.zjxn.jetpack.repository.ProjectRepository
import com.module.lemlin.http.HttpResponseBody
import com.module.lemlin.http.SubscribeViewModel


class LeagueViewModel(application: Application) : BaseViewModel(application) {

    private val mLeagueRepository: LeagueRepository = LeagueRepository()

    val leagueMemberLiveData = MutableLiveData<HttpResponseBody<LeagueMemberResponse>>()
    fun leagueEnterprise(
        industry_id: String? = null,
        title: String? = null
    ) {
        setRxLifeScope(SubscribeViewModel(leagueMemberLiveData)) {
            mLeagueRepository.leagueEnterprise(industry_id, title, page = "1", limit = "100")
        }
    }

    val industryListLiveData = MutableLiveData<HttpResponseBody<IndustryListResponse>>()
    fun userIndustryList() {
        setRxLifeScope(SubscribeViewModel(industryListLiveData)) {
            mLeagueRepository.userIndustryList()
        }
    }


}